/* Computes the factorial */
# include "../include/xmalloc.h"
# include <stdio.h>
int64_t fact(int64_t n){
	if (n == 0 || n == 1)
		return 1;
	else
		return n * fact(n-1);
}

/* Computes aCb */
int aCombB(int a, int b){
	int num = 1;
	int den = 1;
	int counter = 0;

	if (a < b){
		printf("\n\nSome error occurred while computing combination");
		return 0;
	}
	else if (a == b)
		return 1;

	else{
		for (counter = 1 ; counter <= b ; counter++){
			num *= a--;
			den *= counter;
		}
		return num / den;
	}
	return 0;
}

/* int main(int argc , char ** argv){
	printf("%d" , aCombB(10 , 7));
	return 0;
}*/

